#include <iostream>
#include <algorithm>
using namespace std;

string add(string s1,string s2){
    string s;
    reverse(s1.begin(),s1.end());
    reverse(s2.begin(),s2.end());
    int p = 0;
    for(int i=0;i<s1.size();i++){
        int t = s1[i]-'0'+s2[i]-'0'+p;
        if(t>=10){
            s.append(1,t%10+'0');
            p = 1;
        }
        else{
            s.append(1,t+'0');
            p = 0;
        }
    }
    if(p==1)    s.append(1,'1');
    reverse(s.begin(),s.end());
    return s;
}

signed main()
{
    string s1,s2;
    cin>>s1;
    s2 = s1;
    reverse(s1.begin(),s1.end());
    for(int i=0;i<10;i++){
        if(s1==s2){
            cout<<s2<<" is a palindromic number.\n";
            return 0;
        }
        string s = add(s1,s2);
        cout<<s2<<" + "<<s1<<" = "<<s<<"\n";
        s2 = s1 = s;
        reverse(s1.begin(),s1.end());
    }
    if(s1==s2){
        cout<<s2<<" is a palindromic number.\n";
    }
    else    cout<<"Not found in 10 iterations.\n";
    return 0;
}
